package com.cubeofnine.sugar.service.element;

public class DatabaseElement {
	private int id = -1;
	private String username = "";
	private String password = "";
	private String sugarUrl = "";
	private boolean rememberPassword = false;
	private boolean automaticLogin = false;
	private String sessionId = "";
	private boolean userAdmin = false;
	private ErrorValue errorValue = null;

	public DatabaseElement() {

	}

	public DatabaseElement(int id, String username, String password,
			String sugarUrl, boolean rememberPassword, boolean automaticLogin,
			String sessionId, boolean userAdmin, ErrorValue errorValue) {

		this.id = id;
		this.username = username;
		this.password = password;
		this.sugarUrl = sugarUrl;
		this.rememberPassword = rememberPassword;
		this.automaticLogin = automaticLogin;
		this.sessionId = sessionId;
		this.userAdmin = userAdmin;
		this.errorValue = errorValue;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSugarUrl() {
		return sugarUrl;
	}

	public void setSugarUrl(String sugarUrl) {
		this.sugarUrl = sugarUrl;
	}

	public boolean isRememberPassword() {
		return rememberPassword;
	}

	public void setRememberPassword(boolean rememberPassword) {
		this.rememberPassword = rememberPassword;
	}

	public boolean isAutomaticLogin() {
		return automaticLogin;
	}

	public void setAutomaticLogin(boolean automaticLogin) {
		this.automaticLogin = automaticLogin;
	}

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public boolean isUserAdmin() {
		return userAdmin;
	}

	public void setUserAdmin(boolean userAdmin) {
		this.userAdmin = userAdmin;
	}

	public ErrorValue getErrorValue() {
		return errorValue;
	}

	public void setErrorValue(ErrorValue errorValue) {
		this.errorValue = errorValue;
	}

	@Override
	public String toString() {
		return "DatabaseElement [id=" + id + ", username=" + username
				+ ", password=" + password + ", sugarUrl=" + sugarUrl
				+ ", rememberPassword=" + rememberPassword
				+ ", automaticLogin=" + automaticLogin + ", sessionId="
				+ sessionId + ", userAdmin=" + userAdmin + ", errorValue="
				+ errorValue + "]";
	}

}
